package com.cedar.model.Factory;

public class FactoryTest {
    public static void main(String[] args) {
//        SendFactory factory = new SendFactory();
//        Sender sender = factory.produce("sms");//普通工厂模式
//        Sender sender = factory.produceMail();//多工个厂方法模式
//        Sender sender = SendFactory.produceSms();//静态工厂方法
        
        //抽象工厂模式
        Provider provider = new MailProvider();
        Sender sender = provider.produce();
        sender.Send();
    }
}
